import axios from '@utils/request'

// 获取商品列表
const fetchItems = (params = {}) => axios.get('/api/getItemLists', { params })
// 新增商品
const fetchaddItem = (params = {}) => axios.post('/api/addItems', params)
// 获取商品详情/getItemDetail
const fetchItemDetail = (params = {}) => axios.get('/api/getItemDetail', { params })
// 更新商品成功
const fetchItemUpload = (params = {}) => axios.post('/api/ItemUpload', params)
// 删除商品/delItem
const fetchdelItem = (params = {}) => axios.get('/api/delItem', { params })
// 用户登录
const fetchlogin = (params = {}) => axios.post('/api/login', params)
export {
  fetchItems,
  fetchaddItem,
  fetchItemDetail,
  fetchItemUpload,
  fetchdelItem,
  fetchlogin
}
